<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link th:href="@{/css/style.css}" rel="stylesheet" type="text/css"/>
    <th:block th:include="public::common-script"></th:block>
    <script th:src="@{/layer/layer.js}" type="text/javascript"></script>
    <script th:src="@{/js/Print.js}" type="text/javascript"></script>
    <link rel="stylesheet" th:href="@{/css/font-awesome.css}">
    <link rel="stylesheet" href="http://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css">
    <script src="http://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js" type="text/javascript"></script>

    <style>
        .fa {
            font-size: 24px;
        }

        th {
            text-align: center !important;
        }

        .mytable {
            /*border: solid 1px #ccc;*/
            width: 100%;
            clear: both;
            border-collapse: collapse;
        }

        .mytable th, td {
            text-align: center;
            border: 1px solid #ccc;
        }

        [type=search]{
            border: 1px solid darkgray;
        }
    </style>
</head>


<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">我的班级</a></li>
        <li><a href="#">成绩单</a></li>
    </ul>
</div>

<div class="rightinfo">
    <div class="tools">

        <ul class="toolbar">
            <li onclick="print()"><span><i class="fa fa-print" aria-hidden="true" style="color: #1E9FFF;"></i></span>打印
            </li>
            <li onclick="add()"><span><img th:src="@{/images/t04.png}"/></span>数据分析</li>
        </ul>
    </div>


    <table id="cjd" class="mytable" style="text-align: center;">
        <caption style="font-size: 20px;margin-bottom: 15px;" th:text="${examInfo.name}+'成绩单'"></caption>
        <thead>
        <!--文科-->
        <tr th:if="${examInfo.clazzes[0].getType()==0}">
            <th>学号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>语文</th>
            <th>数学</th>
            <th>英语</th>
            <th>政治</th>
            <th>历史</th>
            <th>地理</th>
            <th>语数英</th>
            <th>文综</th>
            <th>总分</th>
        </tr>
        <!--理科-->
        <tr th:if="${examInfo.clazzes[0].getType()==1}">
            <th>学号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>语文</th>
            <th>数学</th>
            <th>英语</th>
            <th>物理</th>
            <th>化学</th>
            <th>生物</th>
            <th th:if="${clazzPerformanceAnalysisBeans!=null}">语数英</th>
            <th th:if="${clazzPerformanceAnalysisBeans!=null}">理综</th>
            <th th:if="${clazzPerformanceAnalysisBeans!=null}">总分</th>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${achievementList.isEmpty()}">
            <td colspan="19">无数据，你可以先 <a href="" style="color: tomato;">导入数据</a></td>
        </tr>
        <!--文科-->
        <tr th:if="${not achievementList.isEmpty() and examInfo.clazzes[0].getType()==0}"
            th:each="achievement,state:${achievementList}">
            <td th:text="${achievement.student.id}"></td>
            <td th:text="${achievement.student.name}"></td>
            <td th:text="${achievement.student.gender}"></td>
            <td th:text="${achievement.chinese}"></td>
            <td th:text="${achievement.math}"></td>
            <td th:text="${achievement.english}"></td>
            <td th:text="${achievement.politics}"></td>
            <td th:text="${achievement.history}"></td>
            <td th:text="${achievement.geography}"></td>
            <td th:if="${clazzPerformanceAnalysisBeans!=null}" th:text="${clazzPerformanceAnalysisBeans[state.index].mainTotal}"></td>
            <td th:if="${clazzPerformanceAnalysisBeans!=null}" th:text="${clazzPerformanceAnalysisBeans[state.index].liberalArtsTotal}"></td>
            <td th:if="${clazzPerformanceAnalysisBeans!=null}" th:text="${clazzPerformanceAnalysisBeans[state.index].total}"></td>
        </tr>
        <!--理科-->
        <tr th:if="${not achievementList.isEmpty() and examInfo.clazzes[0].getType()==1}"
            th:each="achievement,state:${achievementList}">
            <td th:text="${achievement.student.id}"></td>
            <td th:text="${achievement.student.name}"></td>
            <td th:text="${achievement.student.gender}"></td>
            <td th:text="${achievement.chinese}"></td>
            <td th:text="${achievement.math}"></td>
            <td th:text="${achievement.english}"></td>
            <td th:text="${achievement.physics}"></td>
            <td th:text="${achievement.chemistry}"></td>
            <td th:text="${achievement.biology}"></td>
            <td th:if="${clazzPerformanceAnalysisBeans!=null}" th:text="${clazzPerformanceAnalysisBeans[state.index].mainTotal}"></td>
            <td th:if="${clazzPerformanceAnalysisBeans!=null}" th:text="${clazzPerformanceAnalysisBeans[state.index].scienceTotal}"></td>
            <td th:if="${clazzPerformanceAnalysisBeans!=null}" th:text="${clazzPerformanceAnalysisBeans[state.index].total}"></td>
        </tr>
        </tbody>
    </table>


    <div class="tip">
        <div class="tiptop"><span>提示信息</span><a></a></div>

        <div class="tipinfo">
            <span><img th:src="@{/images/ticon.png}"/></span>
            <div class="tipright">
                <p>是否确认对信息的修改 ？</p>
                <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
            </div>
        </div>

        <div class="tipbtn">
            <input name="" type="button" class="sure" value="确定"/>&nbsp;
            <input name="" type="button" class="cancel" value="取消"/>
        </div>
    </div>


</div>

<script type="text/javascript">
    var arr =[ 11, "desc" ];
    $('.tablelist tbody tr:odd').addClass('odd');
    $(document).ready(function(){
        $('#cjd').DataTable({
            "bPaginate": false, //开关，是否显示分页器
            "bFilter": true, //开关，是否启用客户端过滤器
            "bJQueryUI": false,
            "order": [arr],
            "oLanguage": {
                "sProcessing": "正在加载中......",
                "sLengthMenu": "每页显示 _MENU_ 条记录",
                "sZeroRecords": "对不起，查询不到相关数据！",
                "sEmptyTable": "表中无数据存在！",
                "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
                "sInfoFiltered": "数据表中共为 _MAX_ 条记录",
                "sSearch": "搜索",
                "oPaginate": {
                    "sFirst": "首页",
                    "sPrevious": "上一页",
                    "sNext": "下一页",
                    "sLast": "末页"
                }
            } ,//多语言配置
        });
    });

</script>
<script type="text/javascript" th:inline="javascript">
    function print() {
        Print("#cjd");
    }

</script>

</body>
</html>
